import { getNewsList } from "../../api/news";
import { NEWS_SET_LIST } from "./actionType"

export const getNewsListCreator = (id) => {
    return async (dispatch) => {
        const { data } = await getNewsList(id)
        console.log(6, data);
        dispatch({ type: NEWS_SET_LIST, payload: data.results })
    }
}

